<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-if用法</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
  <div id="app">

       <span v-if="flag">hello world</span>

  </div>

<script>
    var app =new Vue({
      el:"#app",
        data:{
            flag: true,
        }
    });

</script>
</body>
</html>